﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<GIFT_SHOP_MVC.Models.User>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Edit User</title>
<link href="../../Content/style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</head>
<body style="background:#e1d1d6;">
    <h2>Edit User</h2>
        <%: Html.ValidationSummary(true) %>
        <form id="edit" action="../../Admin/EditUser" method="post">
        <fieldset>
            <legend>Account Information</legend>
            <table class="style1" cellspacing="7">
                <tr>
                    <td align="right">
                        <%: Html.LabelFor(model => model.HoTen) %></td>
                    <td>
                        <%: Html.TextBoxFor(model => model.HoTen) %>
                        <b style="color:Red;"><%: Html.ValidationMessageFor(model => model.HoTen) %></b></td>
                </tr>
                <tr>
                    <td align="right">
                        <%: Html.LabelFor(model => model.UserName) %></td>
                    <td>
                        <%: Html.TextBoxFor(model => model.UserName) %>
                        <b style="color:Red;"><%: Html.ValidationMessageFor(model => model.UserName) %>
                        <% if (Session["checkuser"]!=null && (bool)Session["checkuser"] == false) Response.Write("UserName already exists !"); %></b></td>
                </tr>
                <tr>
                    <td align="right">
                        <%: Html.LabelFor(model => model.DiaChi) %></td>
                    <td>
                        <%: Html.TextBoxFor(model => model.DiaChi) %>
                        <b style="color:Red;"><%: Html.ValidationMessageFor(model => model.DiaChi) %></b></td>
                </tr>
                <tr>
                    <td align="right">
                        <%: Html.LabelFor(model => model.DienThoai) %></td>
                    <td>
                        <%: Html.TextBoxFor(model => model.DienThoai) %>
                        <b style="color:Red;"><%: Html.ValidationMessageFor(model => model.DienThoai) %></b></td>
                </tr>
                <tr>
                    <td align="right">
                        <%: Html.LabelFor(model => model.Ma_TT) %></td>
                    <td>
                    <%
                        GIFT_SHOP_MVC.Models.GiftShop_LinQDataContext data = new GIFT_SHOP_MVC.Models.GiftShop_LinQDataContext();
                        var temp = data.GetUserStatus();
                        SelectList liststt = new SelectList(temp,"Ma_TT","Ten"); %>
                        <%: Html.DropDownListFor(model => model.Ma_TT,liststt) %></td>
                </tr>
                <tr>
                    <td align="right">
                        <%: Html.HiddenFor(model => model.MaUser) %></td>
                    <td>
                        <input type="submit" id="submit_btn" value="Save" /></td>
                </tr>
            </table>
        </fieldset>
        </form>
</body>
</html>

